BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 795
Left = 180
TabIndex = 23
Top = 180
Width = 3765
End
Begin VB.Label LabelForeColor
BorderStyle = 1 'Fixed Single
Height = 345
Left = 1590
TabIndex = 22
Top = 4740
Width = 345
End
Begin VB.Label LabelDrawColor
BorderStyle = 1 'Fixed Single
Height = 345
Left = 1590
TabIndex = 21
Top = 4320
Width = 345
End
Begin VB.Label LabelFillColor
BorderStyle = 1 'Fixed Single
Height = 345
Left = 1590
TabIndex = 20
Top = 3900
Width = 345
End
Begin VB.Label Label5
AutoSize = -1 'True
Caption = "DrawStyle:"
Height = 195
Left = 180
TabIndex = 17
Top = 3000
Width = 765
End
Begin VB.Label Label3
AutoSize = -1 'True
Caption = "Text Alignment:"
Height = 195
Left = 180
TabIndex = 16
Top = 1530
Width = 1095
End
Begin VB.Label Label2
AutoSize = -1 'True
Caption = "Node Shape:"
Height = 195
Left = 180
TabIndex = 15
Top = 1170
Width = 945
End
Attribute VB_Name = "ItemProp"
Attribute VB_Creatable = False
Attribute VB_Exposed = False
Option Explicit
Private Sub Check1_Click()
End Sub
Private Sub Command1_Click()
With Main.AddFlow1
If .SelectedNode Is Nothing And .SelectedLink Is Nothing Then
' No current item
.FillColor = LabelFillColor.BackColor
.ForeColor = LabelForeColor.BackColor
.DrawColor = LabelDrawColor.BackColor
.DrawStyle = ComboDrawStyle.ListIndex
.DrawWidth = Val(TextDrawWidth)
.ArrowDst = ComboArrowDst.ListIndex
.ArrowOrg = ComboArrowOrg.ListIndex
.LinkStyle = ComboLinkStyle.ListIndex
.Hidden = (CheckHiding.value = 1)
.Transparent = (CheckTransparent.value = 1)
.Shape = ComboShape.ListIndex
.Alignment = ComboAlignment.ListIndex
Set .Font = LabelFont.Font
ElseIf .SelectedLink Is Nothing Then
' Current node
Dim node As afNode
Set node = .SelectedNode
node.DrawColor = LabelDrawColor.BackColor
node.ForeColor = LabelForeColor.BackColor
node.Text = Text1
node.Tag = Text2
node.UserData = Val(Text3)
node.DrawStyle = ComboDrawStyle.ListIndex
node.DrawWidth = Val(TextDrawWidth)
node.Hidden = (CheckHiding.value = 1)
node.Transparent = (CheckTransparent.value = 1)
node.Marked = (CheckMarked.value = 1)
node.Shape = ComboShape.ListIndex
node.Alignment = ComboAlignment.ListIndex
node.FillColor = LabelFillColor.BackColor
Set node.Font = LabelFont.Font
Else
' Current Link
Dim link As afLink
Set link = .SelectedLink
link.DrawColor = LabelDrawColor.BackColor
link.ForeColor = LabelForeColor.BackColor
link.Text = Text1
link.Tag = Text2
link.UserData = Val(Text3)
link.DrawStyle = ComboDrawStyle.ListIndex
link.LinkStyle = ComboLinkStyle.ListIndex
link.DrawWidth = Val(TextDrawWidth)
link.Hidden = (CheckHiding.value = 1)
link.Rigid = (CheckRigid.value = 1)
link.Marked = (CheckMarked.value = 1)
link.ArrowDst = ComboArrowDst.ListIndex
link.ArrowOrg = ComboArrowOrg.ListIndex
Set link.Font = LabelFont.Font
End If
End With
Unload Me
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
Private Sub CommandDrawColor_Click()
With CommonDialog1
.Color = LabelDrawColor.BackColor
.Flags = cdlCCRGBInit
.Action = 3
LabelDrawColor.BackColor = .Color
End With
End Sub
Private Sub CommandFillColor_Click()
With CommonDialog1
.Color = LabelFillColor.BackColor
.Flags = cdlCCRGBInit
.Action = 3
LabelFillColor.BackColor = .Color
End With
End Sub
Private Sub CommandFont_Click()
With CommonDialog1
.FontName = LabelFont.Font.Name
.FontSize = LabelFont.Font.Size
.FontBold = LabelFont.Font.Bold
.FontItalic = LabelFont.Font.Italic
.FontUnderline = LabelFont.Font.Underline
.FontStrikethru = LabelFont.Font.Strikethrough
.Flags = cdlCFScreenFonts Or cdlCFEffects
.ShowFont
If .CancelError = False Then
LabelFont.Font.Name = .FontName
LabelFont.Font.Size = .FontSize
LabelFont.Font.Bold = .FontBold
LabelFont.Font.Italic = .FontItalic
LabelFont.Font.Underline = .FontUnderline
LabelFont.Font.Strikethrough = .FontStrikethru
End If
End With
End Sub
Private Sub CommandForeColor_Click()
With CommonDialog1
.Color = LabelForeColor.BackColor
.Flags = cdlCCRGBInit
.Action = 3
LabelForeColor.BackColor = .Color
End With
End Sub
Private Sub Form_Load()
Dim f As Font
With Main.AddFlow1
If .SelectedNode Is Nothing And .SelectedLink Is Nothing Then
FrameUserData.Visible = False
LabelComment.Caption = "No current item: therefore property settings are persistent. Next created items will received those property values by default."
Text1.Enabled = False
Text2.Enabled = False
Text3.Enabled = False
CheckRigid.Enabled = False
CheckMarked.Enabled = False
ComboArrowDst.ListIndex = .ArrowDst
ComboArrowOrg.ListIndex = .ArrowOrg
ComboLinkStyle.ListIndex = .LinkStyle
If .Transparent Then
CheckTransparent.value = 1
Else
CheckTransparent.value = 0
End If
ComboShape.ListIndex = .Shape
ComboAlignment.ListIndex = .Alignment
LabelFillColor.BackColor = .FillColor
If .Hidden Then
CheckHiding.value = 1
Else
CheckHiding.value = 0
End If
ComboDrawStyle.ListIndex = .DrawStyle
LabelDrawColor.BackColor = .DrawColor
LabelForeColor.BackColor = .ForeColor
TextDrawWidth = Str(.DrawWidth)
Set f = .Font
ElseIf .SelectedNode Is Nothing Then
' Selected link
LabelComment.Caption = "The current item is a link. ""Node-only"" properties are disabled. Property settings will apply only to this current link."